#include<stdio.h>

unsigned char   seconds,minutes,hours;

void printtime(void)
{
  printf("The time is %d:%d:%d\n",hours,minutes,seconds);
}

void settime(unsigned char hour,unsigned char min,unsigned char sec)
{
seconds = sec;
minutes = min;
hours = hour;
}

AdjustOverflowHours()
{
if (hours == 24)
	{
	hours=0;
	//incrementday();
	}

}

incrementhour()
{
 hours++;
AdjustOverflowHours();
}

AdjustOverflowMinutes()
{
if (minutes == 60)
	{
	minutes=0;
	incrementhour();
	}

}

incrementminute()
{
 minutes++;
AdjustOverflowMinutes();
}


AdjustOverflowSeconds()
{
if (seconds == 60)
	{
	seconds=0;
	incrementminute();
	}
}

void incrementsecond(void)
{
seconds++;
AdjustOverflowSeconds();
}

